package org.vergil;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@SpringBootApplication
public class SpringbootdemoApplication implements EmbeddedServletContainerCustomizer {

    private static Logger log = LoggerFactory.getLogger(SpringbootdemoApplication.class);

    public static void main(String[] args) {

        SpringApplication.run(SpringbootdemoApplication.class, args);
        log.info("test log");
    }

    /**
     * 修改启动端口号
     * @param configurableEmbeddedServletContainer
     */
    @Override
    public void customize(ConfigurableEmbeddedServletContainer configurableEmbeddedServletContainer) {
        configurableEmbeddedServletContainer.setPort(8088);
    }
}
